using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace FluentTags
{

    public class DivTag : Tag<DivTag>
    {
        public DivTag() : base("div"){}
        
        public DivTag(string text) : this()
        {
            Controls.Add(new LiteralControl(text));
        }

        public DivTag(object value) : this()
        {
            Controls.Add(new LiteralControl(SafeString(value)));
        }
        
        
        public DivTag(Control control) : this()
        {
            Controls.Add(control);
        }
        
        
        
        
        public ATag<DivTag> A()
        {
            var ctrl = new ATag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag A(ATag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ATag<DivTag> A(string text)
        {
            var ctrl = new ATag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public ATag<DivTag> A(Control control)
        {
            var ctrl = new ATag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public ATag<DivTag> A(object value)
        {
            return A(SafeString(value));
        }
        
        public BTag<DivTag> B()
        {
            var ctrl = new BTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag B(BTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BTag<DivTag> B(string text)
        {
            var ctrl = new BTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BTag<DivTag> B(Control control)
        {
            var ctrl = new BTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BTag<DivTag> B(object value)
        {
            return B(SafeString(value));
        }
        
        public BlockquoteTag<DivTag> Blockquote()
        {
            var ctrl = new BlockquoteTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Blockquote(BlockquoteTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BlockquoteTag<DivTag> Blockquote(string text)
        {
            var ctrl = new BlockquoteTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BlockquoteTag<DivTag> Blockquote(Control control)
        {
            var ctrl = new BlockquoteTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BlockquoteTag<DivTag> Blockquote(object value)
        {
            return Blockquote(SafeString(value));
        }
        
        public BRTag<DivTag> BR()
        {
            var ctrl = new BRTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag BR(BRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<DivTag> Div()
        {
            var ctrl = new DivTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Div(DivTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<DivTag> Div(string text)
        {
            var ctrl = new DivTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public DivTag<DivTag> Div(Control control)
        {
            var ctrl = new DivTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public DivTag<DivTag> Div(object value)
        {
            return Div(SafeString(value));
        }
        
        public EMTag<DivTag> EM()
        {
            var ctrl = new EMTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag EM(EMTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public EMTag<DivTag> EM(string text)
        {
            var ctrl = new EMTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public EMTag<DivTag> EM(Control control)
        {
            var ctrl = new EMTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public EMTag<DivTag> EM(object value)
        {
            return EM(SafeString(value));
        }
        
        public H1Tag<DivTag> H1()
        {
            var ctrl = new H1Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H1(H1Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H1Tag<DivTag> H1(string text)
        {
            var ctrl = new H1Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H1Tag<DivTag> H1(Control control)
        {
            var ctrl = new H1Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H1Tag<DivTag> H1(object value)
        {
            return H1(SafeString(value));
        }
        
        public H2Tag<DivTag> H2()
        {
            var ctrl = new H2Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H2(H2Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H2Tag<DivTag> H2(string text)
        {
            var ctrl = new H2Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H2Tag<DivTag> H2(Control control)
        {
            var ctrl = new H2Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H2Tag<DivTag> H2(object value)
        {
            return H2(SafeString(value));
        }
        
        public H3Tag<DivTag> H3()
        {
            var ctrl = new H3Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H3(H3Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H3Tag<DivTag> H3(string text)
        {
            var ctrl = new H3Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H3Tag<DivTag> H3(Control control)
        {
            var ctrl = new H3Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H3Tag<DivTag> H3(object value)
        {
            return H3(SafeString(value));
        }
        
        public H4Tag<DivTag> H4()
        {
            var ctrl = new H4Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H4(H4Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H4Tag<DivTag> H4(string text)
        {
            var ctrl = new H4Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H4Tag<DivTag> H4(Control control)
        {
            var ctrl = new H4Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H4Tag<DivTag> H4(object value)
        {
            return H4(SafeString(value));
        }
        
        public H5Tag<DivTag> H5()
        {
            var ctrl = new H5Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H5(H5Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H5Tag<DivTag> H5(string text)
        {
            var ctrl = new H5Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H5Tag<DivTag> H5(Control control)
        {
            var ctrl = new H5Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H5Tag<DivTag> H5(object value)
        {
            return H5(SafeString(value));
        }
        
        public H6Tag<DivTag> H6()
        {
            var ctrl = new H6Tag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag H6(H6Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H6Tag<DivTag> H6(string text)
        {
            var ctrl = new H6Tag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H6Tag<DivTag> H6(Control control)
        {
            var ctrl = new H6Tag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H6Tag<DivTag> H6(object value)
        {
            return H6(SafeString(value));
        }
        
        public HRTag<DivTag> HR()
        {
            var ctrl = new HRTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag HR(HRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ITag<DivTag> I()
        {
            var ctrl = new ITag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag I(ITag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ITag<DivTag> I(string text)
        {
            var ctrl = new ITag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public ITag<DivTag> I(Control control)
        {
            var ctrl = new ITag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public ITag<DivTag> I(object value)
        {
            return I(SafeString(value));
        }
        
        public ImgTag<DivTag> Img()
        {
            var ctrl = new ImgTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Img(ImgTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public OLTag<DivTag> OL()
        {
            var ctrl = new OLTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag OL(OLTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<DivTag> P()
        {
            var ctrl = new PTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag P(PTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<DivTag> P(string text)
        {
            var ctrl = new PTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PTag<DivTag> P(Control control)
        {
            var ctrl = new PTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PTag<DivTag> P(object value)
        {
            return P(SafeString(value));
        }
        
        public PreTag<DivTag> Pre()
        {
            var ctrl = new PreTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Pre(PreTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PreTag<DivTag> Pre(string text)
        {
            var ctrl = new PreTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PreTag<DivTag> Pre(Control control)
        {
            var ctrl = new PreTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PreTag<DivTag> Pre(object value)
        {
            return Pre(SafeString(value));
        }
        
        public SpanTag<DivTag> Span()
        {
            var ctrl = new SpanTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Span(SpanTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SpanTag<DivTag> Span(string text)
        {
            var ctrl = new SpanTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SpanTag<DivTag> Span(Control control)
        {
            var ctrl = new SpanTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SpanTag<DivTag> Span(object value)
        {
            return Span(SafeString(value));
        }
        
        public StrongTag<DivTag> Strong()
        {
            var ctrl = new StrongTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Strong(StrongTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public StrongTag<DivTag> Strong(string text)
        {
            var ctrl = new StrongTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public StrongTag<DivTag> Strong(Control control)
        {
            var ctrl = new StrongTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public StrongTag<DivTag> Strong(object value)
        {
            return Strong(SafeString(value));
        }
        
        public SubTag<DivTag> Sub()
        {
            var ctrl = new SubTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Sub(SubTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SubTag<DivTag> Sub(string text)
        {
            var ctrl = new SubTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SubTag<DivTag> Sub(Control control)
        {
            var ctrl = new SubTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SubTag<DivTag> Sub(object value)
        {
            return Sub(SafeString(value));
        }
        
        public SupTag<DivTag> Sup()
        {
            var ctrl = new SupTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Sup(SupTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SupTag<DivTag> Sup(string text)
        {
            var ctrl = new SupTag<DivTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SupTag<DivTag> Sup(Control control)
        {
            var ctrl = new SupTag<DivTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SupTag<DivTag> Sup(object value)
        {
            return Sup(SafeString(value));
        }
        
        public TableTag<DivTag> Table()
        {
            var ctrl = new TableTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag Table(TableTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ULTag<DivTag> UL()
        {
            var ctrl = new ULTag<DivTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag UL(ULTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        
        public DivTag Text(string text)
        {
            Controls.Add(new LiteralControl(text));
            return this;
        }

        public DivTag Text(object value)
        {
            Controls.Add(new LiteralControl(SafeString(value)));
            return this;
        }
        
    }

    public class DivTag<ParentType> : ChildTag<DivTag<ParentType>, ParentType>
        where ParentType : HtmlGenericControl
    {
        public DivTag(ParentType parent) : base("div", parent) { }

        
        
        
        public ATag<DivTag<ParentType>> A()
        {
            var ctrl = new ATag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> A(ATag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ATag<DivTag<ParentType>> A(string text)
        {
            var ctrl = new ATag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public ATag<DivTag<ParentType>> A(Control control)
        {
            var ctrl = new ATag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public ATag<DivTag<ParentType>> A(object value)
        {
            var ctrl = new ATag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public BTag<DivTag<ParentType>> B()
        {
            var ctrl = new BTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> B(BTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BTag<DivTag<ParentType>> B(string text)
        {
            var ctrl = new BTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BTag<DivTag<ParentType>> B(Control control)
        {
            var ctrl = new BTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BTag<DivTag<ParentType>> B(object value)
        {
            var ctrl = new BTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public BlockquoteTag<DivTag<ParentType>> Blockquote()
        {
            var ctrl = new BlockquoteTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Blockquote(BlockquoteTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BlockquoteTag<DivTag<ParentType>> Blockquote(string text)
        {
            var ctrl = new BlockquoteTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BlockquoteTag<DivTag<ParentType>> Blockquote(Control control)
        {
            var ctrl = new BlockquoteTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BlockquoteTag<DivTag<ParentType>> Blockquote(object value)
        {
            var ctrl = new BlockquoteTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public BRTag<DivTag<ParentType>> BR()
        {
            var ctrl = new BRTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> BR(BRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<DivTag<ParentType>> Div()
        {
            var ctrl = new DivTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Div(DivTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<DivTag<ParentType>> Div(string text)
        {
            var ctrl = new DivTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public DivTag<DivTag<ParentType>> Div(Control control)
        {
            var ctrl = new DivTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public DivTag<DivTag<ParentType>> Div(object value)
        {
            var ctrl = new DivTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public EMTag<DivTag<ParentType>> EM()
        {
            var ctrl = new EMTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> EM(EMTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public EMTag<DivTag<ParentType>> EM(string text)
        {
            var ctrl = new EMTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public EMTag<DivTag<ParentType>> EM(Control control)
        {
            var ctrl = new EMTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public EMTag<DivTag<ParentType>> EM(object value)
        {
            var ctrl = new EMTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H1Tag<DivTag<ParentType>> H1()
        {
            var ctrl = new H1Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H1(H1Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H1Tag<DivTag<ParentType>> H1(string text)
        {
            var ctrl = new H1Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H1Tag<DivTag<ParentType>> H1(Control control)
        {
            var ctrl = new H1Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H1Tag<DivTag<ParentType>> H1(object value)
        {
            var ctrl = new H1Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H2Tag<DivTag<ParentType>> H2()
        {
            var ctrl = new H2Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H2(H2Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H2Tag<DivTag<ParentType>> H2(string text)
        {
            var ctrl = new H2Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H2Tag<DivTag<ParentType>> H2(Control control)
        {
            var ctrl = new H2Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H2Tag<DivTag<ParentType>> H2(object value)
        {
            var ctrl = new H2Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H3Tag<DivTag<ParentType>> H3()
        {
            var ctrl = new H3Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H3(H3Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H3Tag<DivTag<ParentType>> H3(string text)
        {
            var ctrl = new H3Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H3Tag<DivTag<ParentType>> H3(Control control)
        {
            var ctrl = new H3Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H3Tag<DivTag<ParentType>> H3(object value)
        {
            var ctrl = new H3Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H4Tag<DivTag<ParentType>> H4()
        {
            var ctrl = new H4Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H4(H4Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H4Tag<DivTag<ParentType>> H4(string text)
        {
            var ctrl = new H4Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H4Tag<DivTag<ParentType>> H4(Control control)
        {
            var ctrl = new H4Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H4Tag<DivTag<ParentType>> H4(object value)
        {
            var ctrl = new H4Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H5Tag<DivTag<ParentType>> H5()
        {
            var ctrl = new H5Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H5(H5Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H5Tag<DivTag<ParentType>> H5(string text)
        {
            var ctrl = new H5Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H5Tag<DivTag<ParentType>> H5(Control control)
        {
            var ctrl = new H5Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H5Tag<DivTag<ParentType>> H5(object value)
        {
            var ctrl = new H5Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H6Tag<DivTag<ParentType>> H6()
        {
            var ctrl = new H6Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> H6(H6Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H6Tag<DivTag<ParentType>> H6(string text)
        {
            var ctrl = new H6Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H6Tag<DivTag<ParentType>> H6(Control control)
        {
            var ctrl = new H6Tag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H6Tag<DivTag<ParentType>> H6(object value)
        {
            var ctrl = new H6Tag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public HRTag<DivTag<ParentType>> HR()
        {
            var ctrl = new HRTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> HR(HRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ITag<DivTag<ParentType>> I()
        {
            var ctrl = new ITag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> I(ITag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ITag<DivTag<ParentType>> I(string text)
        {
            var ctrl = new ITag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public ITag<DivTag<ParentType>> I(Control control)
        {
            var ctrl = new ITag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public ITag<DivTag<ParentType>> I(object value)
        {
            var ctrl = new ITag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public ImgTag<DivTag<ParentType>> Img()
        {
            var ctrl = new ImgTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Img(ImgTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public OLTag<DivTag<ParentType>> OL()
        {
            var ctrl = new OLTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> OL(OLTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<DivTag<ParentType>> P()
        {
            var ctrl = new PTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> P(PTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<DivTag<ParentType>> P(string text)
        {
            var ctrl = new PTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PTag<DivTag<ParentType>> P(Control control)
        {
            var ctrl = new PTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PTag<DivTag<ParentType>> P(object value)
        {
            var ctrl = new PTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public PreTag<DivTag<ParentType>> Pre()
        {
            var ctrl = new PreTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Pre(PreTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PreTag<DivTag<ParentType>> Pre(string text)
        {
            var ctrl = new PreTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PreTag<DivTag<ParentType>> Pre(Control control)
        {
            var ctrl = new PreTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PreTag<DivTag<ParentType>> Pre(object value)
        {
            var ctrl = new PreTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public SpanTag<DivTag<ParentType>> Span()
        {
            var ctrl = new SpanTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Span(SpanTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SpanTag<DivTag<ParentType>> Span(string text)
        {
            var ctrl = new SpanTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SpanTag<DivTag<ParentType>> Span(Control control)
        {
            var ctrl = new SpanTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SpanTag<DivTag<ParentType>> Span(object value)
        {
            var ctrl = new SpanTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public StrongTag<DivTag<ParentType>> Strong()
        {
            var ctrl = new StrongTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Strong(StrongTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public StrongTag<DivTag<ParentType>> Strong(string text)
        {
            var ctrl = new StrongTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public StrongTag<DivTag<ParentType>> Strong(Control control)
        {
            var ctrl = new StrongTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public StrongTag<DivTag<ParentType>> Strong(object value)
        {
            var ctrl = new StrongTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public SubTag<DivTag<ParentType>> Sub()
        {
            var ctrl = new SubTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Sub(SubTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SubTag<DivTag<ParentType>> Sub(string text)
        {
            var ctrl = new SubTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SubTag<DivTag<ParentType>> Sub(Control control)
        {
            var ctrl = new SubTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SubTag<DivTag<ParentType>> Sub(object value)
        {
            var ctrl = new SubTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public SupTag<DivTag<ParentType>> Sup()
        {
            var ctrl = new SupTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Sup(SupTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public SupTag<DivTag<ParentType>> Sup(string text)
        {
            var ctrl = new SupTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public SupTag<DivTag<ParentType>> Sup(Control control)
        {
            var ctrl = new SupTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public SupTag<DivTag<ParentType>> Sup(object value)
        {
            var ctrl = new SupTag<DivTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public TableTag<DivTag<ParentType>> Table()
        {
            var ctrl = new TableTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> Table(TableTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ULTag<DivTag<ParentType>> UL()
        {
            var ctrl = new ULTag<DivTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public DivTag<ParentType> UL(ULTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        
        public DivTag<ParentType> Text(string text)
        {
            Controls.Add(new LiteralControl(text));
            return this;
        }
        
        public DivTag<ParentType> Text(object value)
        {
            Controls.Add(new LiteralControl(SafeString(value)));
            return this;
        }
        
        
    }
}